package com.info.zhiduoduo.repository.mapper.customer;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.dto.customer.FollowingDto;
import com.info.zhiduoduo.repository.entity.customer.Following;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface FollowingMapper extends BaseMapper<Following> {


    @Select("select foll.id,foll.following_row,foll.createtime," +
            "foll.updatetime,foll.create_person,ma.managername as createPersonName,foll.update_person,man.managername as updatePersonName,foll.service_error_id \n" +
            "from zdd_service_following foll\n" +
            "left join zdd_system_manager man on foll.update_person=man.managerid " +
            "left join zdd_system_manager ma on foll.create_person=ma.managerid " +
            "where foll.service_error_id=${id}" )
    List<FollowingDto> findFollowingByRelationId(@Param("id") Integer id);
}
